<?php
/**
 * @annotate 后台首页
 * @group   Admin/Haiyin
 * @author   mengke.yue <mengke.yue@gmail.com>
 */
class HomeAction extends BaseAction {
	protected $aVerify = array(
   	'index'
  	);//需要验证的方法
	public function index(){
		$this->assign('Title',"人才来了后台首页");
		$timetoday = strtotime(date("Y-m-d",time()));//今天0点的时间点
		$timeyestoday = $timetoday - 3600*24;//今天0点的时间点，两个值之间即为昨
		//未审核品牌
		$sta['brand_status'] = 0;
		$b_w_cou = D('Brand')->brand_count($sta);
		$this->assign('b_w_cou',$b_w_cou);
		//今日新增品牌
		$brand_t['updateline'] = array('egt',$timetoday);
		$b_t_cou = D('Brand')->brand_count($brand_t);
		$this->assign('b_t_cou',$b_t_cou);
		//昨日新增品牌
		$brand_y['updateline'] = array('between',$timeyestoday.','.$timetoday);
		$b_y_cou = D('Brand')->brand_count($brand_y);
		$this->assign('b_y_cou',$b_y_cou);
		//未审核公司
		$status['status'] = 0;
		$c_w_cou = D('Company')->com_count($status);
		$this->assign('c_w_cou',$c_w_cou);
		//今日新增公司
		$c_t_cou = D('Company')->com_count($brand_t);
		$this->assign('c_t_cou',$c_t_cou);
		//昨日新增公司
		$c_y_cou = D('Company')->com_count($brand_y);
		$this->assign('c_y_cou',$c_y_cou);
		//未审核职位
		$h_w_cou = D('Company')->hiring_count($status);
		$this->assign('h_w_cou',$h_w_cou);
		//今日新增职位
		$h_t_cou = D('Company')->hiring_count($brand_t);
		$this->assign('h_t_cou',$h_t_cou);
		//昨日新增职位
		$h_y_cou = D('Company')->hiring_count($brand_y);
		$this->assign('h_y_cou',$h_y_cou);
		//今日投递简历
		$send_t['send_time'] = array('egt',$timetoday);
		$t_s_cou = D('send_time')->where($send_t)->count();
		$this->assign('t_s_cou',$t_s_cou);
		//今日新增简历
		$info_t['ctime'] = array('egt',$timetoday);
		$r_t_cou = D('member_info')->where($info_t)->count();
		$this->assign('r_t_cou',$r_t_cou);
		//昨日新增简历
		$info_y['ctime'] = array('between',$timeyestoday.','.$timetoday);
		$r_y_cou = D('member_info')->where($info_y)->count();
		$this->assign('r_y_cou',$r_y_cou);
		$this->display();
	}
}
?>